﻿using System;
class ExamineIntegers
{
    static void Main()
    {
        int numberone;
        int numbertwo;
        Console.WriteLine("Input two integers: ");
        while (true)
        {
            try
            {
                numberone = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception)
            {
                Console.Write("Please re-enter first number: ");
            }
        }
        while (true)
        {
            try
            {
                numbertwo = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception)
            {
                Console.Write("Please re-enter first number: ");
            }
        }
        if (numberone > numbertwo)
        {
            Console.WriteLine("{0} is greater then {1}, so we exchange values", numberone, numbertwo);
            numbertwo = (numberone + numbertwo) - (numberone = numbertwo);
        }
        else
        {
            Console.WriteLine("{0} is smaller then {1}, so we leave them", numberone, numbertwo);
        }
        Console.WriteLine("First integer is {0}", numberone);
        Console.WriteLine("Second integer is {0}", numbertwo);
        Console.ReadLine();
    }
}

